Proof Techniques

Informal Proof Techniques

In the real world, we mix English and mathematical statements to do proofs.

Professor’s Note: Remember to tie your discrete structure knowledge to your programming knowledge!

A: Counterexample

Counterexample: Look for a counterexample that disproves the conjecture.

Example: Prove of disprove that “For every integer n, n! \le n^2

Example: All animals living in the ocean are fish.

Example: Every integer less than 10 is bigger than 5

Counterexample is not trivial for all cases.

B: Exhaustive Proof

Exhaustive Proof: Go over all possible cases for each member of the finite domain.

Example: For any natural number less than or equal to 5, the square of the integer is less than or equal to the sum of 10 plus 5 times the integer

nn^210+5nn^2 \le 10 + 5n
0010true
1115true
2420true
3925true
41630true
52535true

C: Direct Proof

Direct Proof: Any way to prove P \to Q (using rules of propositional and predicate logic).

Example: Give a direct proof of the theorem “if \textcolor{green}{n} is an odd integer, then \textcolor{blue}{n^2} is odd.”

D: Proof by Cases

Proof by Cases: Breaking the statement into several cases and proving each case separately

Example: Prove that if x is even or y is even, then the product xy is even.

Example: Prove that the product of any 2 consecutive integers is even.

E: Indirect Proof: Proof by Contradiction

Problem Statement: Given P \to Q, sometimes P is really hard to work with.

Proof by Contradiction: If we can prove Q' cannot be true, then we’ve proven that Q is true.

Example: Prove by contradiction “If a number added to itself gives itself, then the number is 0”

F: Proof by Contraposition

Proof by Contraposition: Proving Q' \to P' to prove that P \to Q.

Explanation: Recall the contraposition inference rules from propositional logic:

FromCan DeriveAbbreviation
P \to QQ' \to P'Contraposition; cont
Q' \to P'P \to QContraposition; cont

Example: Prove that if the square of an integer is odd, then the integer must be odd.

Proof by contraposition:

Summarizing Proof Techniques

TechniqueApproach to prove P \to QRemarks
ExhaustiveShow P \to Q for all casesOnly for finite # of cases
DirectAssume P, deduce QStandard approach.
ContrapositionAssume Q', derive P'Use when Q' is easier to manipulate than P
ContradictionAssume P \land Q', deduce contradictionUse when Q is false

General Strategy for Proving P \to Q:

  1. Direct proof is the most commonly used, so try it first.
  2. If the problem domain is finite and small, try exhaustive proof.
  3. If the problem domain is infinite and it is difficult to prove the statement without breaking it down, try proof by cases.
  4. If Q' is easier to manipulate than P, then try proof by contraposition or contradiction.

Exercises: Proving Statements

Example: Prove the following statement

Proof: Let x and y be any positive integers.

Let x>0 \land y>0

Assume: x+y\le0

Problem: Prove or disprove the sum of 3 consecutive integers is even.

Mathematical Representation:

Therefore: \begin{align*} x + (x+1) + (x+2) &= 2k \\ 3x + 3 &= 2k \\ 3(x + 1) &= 2k \\ \end{align*}

Counterexample:

Problem: Prove or disprove the square of an odd integer equals 8k+1 for some integer k

Mathematical Representation:

Therefore: \begin{align*} 4n^2 + 4n + 1 &= 8k + 1 \\ 4n^2 + 4n &= 8k \\ n^2 + n &= 2k \\ \end{align*}

Note: Our goal is now to prove n^2 + n = 2k

Proof by cases:

  1. n is even (n = 2r): \begin{align*} 4r^2 + 2r &= 2k \\ \textcolor{blue}{2}(2r^2 + r) &= 2k \\ \end{align*}
  1. n is odd (2r+1): \begin{align*} (2r+1)^2 + (2r+1) &= 2k \\ 4r^2 + 4r + 1 + 2r + 1 &= 2k \\ 4r^2 + 6r + 2 &= 2k \\ \textcolor{blue}{2}(2r^2 + 3r + 1) &= 2k \end{align*}

Problem: Prove or disprove that the product of 3 consecutive integers is even.

Problem: Prove or disprove that the sum of two rational numbers is rational